<script setup lang="ts">
import Child04 from "../components/项目四/Child05.vue";
import { ref, reactive } from "vue";

let games = reactive([
  { id: "asgytdfats01", name: "英雄联盟" },
  { id: "asgytdfats02", name: "王者荣耀" },
  { id: "asgytdfats03", name: "穿越火线" },
  { id: "asgytdfats04", name: "和平精英" },
]);

let imgUrl = ref("https://z1.ax1x.com/2023/11/19/piNxLo4.jpg");
let videoUrl = ref("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
</script>

<template>
  <div class="father">
    <h3>父组件</h3>
    <div class="content">
      <Child04>
        <template #s1>
          <ul>
            <li v-for="g in games" :key="g.id">
              {{ g.name }}
            </li>
          </ul>
        </template>
        <template #s2>
          <h2>热门游戏列表</h2>
        </template>
      </Child04>
      <Child04>
        <template #s1>
          <img :src="imgUrl" alt="">
        </template>
        <template #s2>
          <h2>今日美食城市</h2>
        </template>
      </Child04>
      <Child04>
        <template #s1>
          <video :src="videoUrl" controls></video>
        </template>
        
      </Child04>
    </div>
  </div>
</template>

<style scoped>
.father {
  background-color: rgb(165, 164, 164);
  padding: 20px;
  border-radius: 10px;
}

.content {
  display: flex;
  justify-content: space-evenly;
}
img,
video {
  width: 100%;
}
</style>
